package com.shj.em.biz.finance.entity;

import java.math.BigDecimal;
import java.util.Date;

import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.shj.em.base.entity.BaseEntity;


import com.shj.em.util.StringUtils;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 付款信息
 * </p>
 *
 * @author Shen Huang Jian
 * @since 2018-07-13
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("oa_order_payment")
public class Payment extends BaseEntity {

    private static final long serialVersionUID = 1L;

    private Long orderId;

    /**
     * 已付金额
     */
    private BigDecimal paid;

    /**
     * 收款日期
     */
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd")
    private Date paidDt;


    public String getPaidAmountStr(){
        return StringUtils.convertAmount2String(paid, 2);
    }

}
